from flask import Flask,make_response,redirect,render_template
import os
from app import create_app,db
from app.models import User,Role
from flask_migrate import Migrate,MigrateCommand
from flask_script import Manager,Shell
app = create_app('develop')
manager=Manager(app)
migrate = Migrate(app,db)
def mak_shell_context():
    return dict(app=app,db=db,User=User,Role=Role)
manager.add_command("shell",Shell(make_context=mak_shell_context()))
manager.add_command("db",MigrateCommand)
if __name__ == '__main__':
    manager.run()
